namespace InventoryManagement
{
	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.ComponentModel;
	using System.Data;
	using System.Data.SqlClient;
	using System.Text;
	
	
	public class Inventory_Physical : BaseTable
	{
		
		#region Static SQL String Members
		/// <remarks>This field represents the full SELECT string for the table Inventory Physical, with the WHERE clause.</remarks>
		internal static string _SQL_Select = @"SELECT [ID], [ID_SysBrand], [ID_SysType], [InventoryBy], [InventoryDate], [ID_RackNumber], [LabelName], [SystemClass], [StartFrom], [SystemDetail], [IPManagement], [IPHost], [HostName], [PathNumber], [SerialNumber], [Processor], [Core], [RAM], [JumlahRAM], [HDD], [KapasitasHDD], [RaidDetail], [ID_DataCabang], [ID_OperatingSystem], [Application], [HW_Physical], [HW_PowerSupply], [HW_HDD], [HW_Memory], [HW_FAN], [HW_Ethernet], [HW_Notes], [URLAttachment], [IsDeleted] FROM [dbo].[Inventory Physical] WHERE [ID]=@ID ";
		
		/// <remarks>This field represents the full SELECT string for the table Inventory Physical, with the WHERE clause.</remarks>
		internal static string _SQL_SelectByParam = "SELECT [ID], [ID_SysBrand], [ID_SysType], [InventoryBy], [InventoryDate], [ID_RackNumber], [LabelName], [SystemClass], [StartFrom], [SystemDetail], [IPManagement], [IPHost], [HostName], [PathNumber], [SerialNumber], [Processor], [Core], [RAM], [JumlahRAM], [HDD], [KapasitasHDD], [RaidDetail], [ID_DataCabang], [ID_OperatingSystem], [Application], [HW_Physical], [HW_PowerSupply], [HW_HDD], [HW_Memory], [HW_FAN], [HW_Ethernet], [HW_Notes], [URLAttachment], [IsDeleted] FROM [dbo].[Inventory Physical] WHERE isnull(convert(varchar(36),[ID]),\'true\')=isnull(convert(varchar(36),@ID),isnull(convert(varchar(36),[ID]),\'true\')) AND isnull(convert(varchar(36),[ID_SysBrand]),\'true\')=isnull(convert(varchar(36),@ID_SysBrand),isnull(convert(varchar(36),[ID_SysBrand]),\'true\')) AND isnull(convert(varchar(36),[ID_SysType]),\'true\')=isnull(convert(varchar(36),@ID_SysType),isnull(convert(varchar(36),[ID_SysType]),\'true\')) AND isnull(convert(varchar,[InventoryBy]),\'true\')=isnull(convert(varchar,@InventoryBy),isnull(convert(varchar,[InventoryBy]),\'true\')) AND isnull(convert(varchar,[InventoryDate]),\'true\')=isnull(convert(varchar,@InventoryDate),isnull(convert(varchar,[InventoryDate]),\'true\')) AND isnull(convert(varchar(36),[ID_RackNumber]),\'true\')=isnull(convert(varchar(36),@ID_RackNumber),isnull(convert(varchar(36),[ID_RackNumber]),\'true\')) AND isnull(convert(varchar,[LabelName]),\'true\')=isnull(convert(varchar,@LabelName),isnull(convert(varchar,[LabelName]),\'true\')) AND isnull(convert(varchar,[SystemClass]),\'true\')=isnull(convert(varchar,@SystemClass),isnull(convert(varchar,[SystemClass]),\'true\')) AND isnull(convert(varchar,[StartFrom]),\'true\')=isnull(convert(varchar,@StartFrom),isnull(convert(varchar,[StartFrom]),\'true\')) AND isnull(convert(varchar,[SystemDetail]),\'true\')=isnull(convert(varchar,@SystemDetail),isnull(convert(varchar,[SystemDetail]),\'true\')) AND isnull(convert(varchar,[IPManagement]),\'true\')=isnull(convert(varchar,@IPManagement),isnull(convert(varchar,[IPManagement]),\'true\')) AND isnull(convert(varchar,[IPHost]),\'true\')=isnull(convert(varchar,@IPHost),isnull(convert(varchar,[IPHost]),\'true\')) AND isnull(convert(varchar,[HostName]),\'true\')=isnull(convert(varchar,@HostName),isnull(convert(varchar,[HostName]),\'true\')) AND isnull(convert(varchar,[PathNumber]),\'true\')=isnull(convert(varchar,@PathNumber),isnull(convert(varchar,[PathNumber]),\'true\')) AND isnull(convert(varchar,[SerialNumber]),\'true\')=isnull(convert(varchar,@SerialNumber),isnull(convert(varchar,[SerialNumber]),\'true\')) AND isnull(convert(varchar,[Processor]),\'true\')=isnull(convert(varchar,@Processor),isnull(convert(varchar,[Processor]),\'true\')) AND isnull(convert(varchar,[Core]),\'true\')=isnull(convert(varchar,@Core),isnull(convert(varchar,[Core]),\'true\')) AND isnull(convert(varchar,[RAM]),\'true\')=isnull(convert(varchar,@RAM),isnull(convert(varchar,[RAM]),\'true\')) AND isnull(convert(varchar,[JumlahRAM]),\'true\')=isnull(convert(varchar,@JumlahRAM),isnull(convert(varchar,[JumlahRAM]),\'true\')) AND isnull(convert(varchar,[HDD]),\'true\')=isnull(convert(varchar,@HDD),isnull(convert(varchar,[HDD]),\'true\')) AND isnull(convert(varchar,[KapasitasHDD]),\'true\')=isnull(convert(varchar,@KapasitasHDD),isnull(convert(varchar,[KapasitasHDD]),\'true\')) AND isnull(convert(varchar,[RaidDetail]),\'true\')=isnull(convert(varchar,@RaidDetail),isnull(convert(varchar,[RaidDetail]),\'true\')) AND isnull(convert(varchar(36),[ID_DataCabang]),\'true\')=isnull(convert(varchar(36),@ID_DataCabang),isnull(convert(varchar(36),[ID_DataCabang]),\'true\')) AND isnull(convert(varchar(36),[ID_OperatingSystem]),\'true\')=isnull(convert(varchar(36),@ID_OperatingSystem),isnull(convert(varchar(36),[ID_OperatingSystem]),\'true\')) AND isnull(convert(varchar,[Application]),\'true\')=isnull(convert(varchar,@Application),isnull(convert(varchar,[Application]),\'true\')) AND isnull(convert(varchar,[HW_Physical]),\'true\')=isnull(convert(varchar,@HW_Physical),isnull(convert(varchar,[HW_Physical]),\'true\')) AND isnull(convert(varchar,[HW_PowerSupply]),\'true\')=isnull(convert(varchar,@HW_PowerSupply),isnull(convert(varchar,[HW_PowerSupply]),\'true\')) AND isnull(convert(varchar,[HW_HDD]),\'true\')=isnull(convert(varchar,@HW_HDD),isnull(convert(varchar,[HW_HDD]),\'true\')) AND isnull(convert(varchar,[HW_Memory]),\'true\')=isnull(convert(varchar,@HW_Memory),isnull(convert(varchar,[HW_Memory]),\'true\')) AND isnull(convert(varchar,[HW_FAN]),\'true\')=isnull(convert(varchar,@HW_FAN),isnull(convert(varchar,[HW_FAN]),\'true\')) AND isnull(convert(varchar,[HW_Ethernet]),\'true\')=isnull(convert(varchar,@HW_Ethernet),isnull(convert(varchar,[HW_Ethernet]),\'true\')) AND isnull(convert(varchar,[HW_Notes]),\'true\')=isnull(convert(varchar,@HW_Notes),isnull(convert(varchar,[HW_Notes]),\'true\')) AND isnull(convert(varchar,[URLAttachment]),\'true\')=isnull(convert(varchar,@URLAttachment),isnull(convert(varchar,[URLAttachment]),\'true\')) AND isnull(convert(varchar,[IsDeleted]),\'true\')=isnull(convert(varchar,@IsDeleted),isnull(convert(varchar,[IsDeleted]),\'true\')) ";
		
		/// <remarks>This field represents the full INSERT INTO string for the table Inventory Physical.</remarks>
		internal static string _SQL_Insert = @"INSERT INTO [dbo].[Inventory Physical] ([ID], [ID_SysBrand], [ID_SysType], [InventoryBy], [InventoryDate], [ID_RackNumber], [LabelName], [SystemClass], [StartFrom], [SystemDetail], [IPManagement], [IPHost], [HostName], [PathNumber], [SerialNumber], [Processor], [Core], [RAM], [JumlahRAM], [HDD], [KapasitasHDD], [RaidDetail], [ID_DataCabang], [ID_OperatingSystem], [Application], [HW_Physical], [HW_PowerSupply], [HW_HDD], [HW_Memory], [HW_FAN], [HW_Ethernet], [HW_Notes], [URLAttachment], [IsDeleted]) VALUES(@ID, @ID_SysBrand, @ID_SysType, @InventoryBy, @InventoryDate, @ID_RackNumber, @LabelName, @SystemClass, @StartFrom, @SystemDetail, @IPManagement, @IPHost, @HostName, @PathNumber, @SerialNumber, @Processor, @Core, @RAM, @JumlahRAM, @HDD, @KapasitasHDD, @RaidDetail, @ID_DataCabang, @ID_OperatingSystem, @Application, @HW_Physical, @HW_PowerSupply, @HW_HDD, @HW_Memory, @HW_FAN, @HW_Ethernet, @HW_Notes, @URLAttachment, @IsDeleted) ";
		
		/// <remarks>This field represents the full UPDATE string for the table Inventory Physical, with the WHERE clause.</remarks>
		internal static string _SQL_Update = @"UPDATE [dbo].[Inventory Physical] SET [ID] = @ID, [ID_SysBrand] = @ID_SysBrand, [ID_SysType] = @ID_SysType, [InventoryBy] = @InventoryBy, [InventoryDate] = @InventoryDate, [ID_RackNumber] = @ID_RackNumber, [LabelName] = @LabelName, [SystemClass] = @SystemClass, [StartFrom] = @StartFrom, [SystemDetail] = @SystemDetail, [IPManagement] = @IPManagement, [IPHost] = @IPHost, [HostName] = @HostName, [PathNumber] = @PathNumber, [SerialNumber] = @SerialNumber, [Processor] = @Processor, [Core] = @Core, [RAM] = @RAM, [JumlahRAM] = @JumlahRAM, [HDD] = @HDD, [KapasitasHDD] = @KapasitasHDD, [RaidDetail] = @RaidDetail, [ID_DataCabang] = @ID_DataCabang, [ID_OperatingSystem] = @ID_OperatingSystem, [Application] = @Application, [HW_Physical] = @HW_Physical, [HW_PowerSupply] = @HW_PowerSupply, [HW_HDD] = @HW_HDD, [HW_Memory] = @HW_Memory, [HW_FAN] = @HW_FAN, [HW_Ethernet] = @HW_Ethernet, [HW_Notes] = @HW_Notes, [URLAttachment] = @URLAttachment, [IsDeleted] = @IsDeleted WHERE [ID]=@ID ";
		
		/// <remarks>This field represents the DELETE string for the table Inventory Physical, with the WHERE clause.</remarks>
		internal static string _SQL_Delete = "DELETE FROM [dbo].[Inventory Physical] WHERE [ID]=@ID ";
		#endregion
		
		#region Tables Members
		/// <remarks>SQL Type:uniqueidentifier - </remarks>
		private System.Nullable<System.Guid> _ID;
		
		[DisplayName("ID")]
		[Category("Primary Key")]
		public System.Nullable<System.Guid> ID
		{
			get
			{
				try
				{
					return _ID;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting ID", err);
				}
			}
			set
			{
				try
				{
					_ID = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting ID", err);
				}
			}
		}
		
		/// <remarks>SQL Type:uniqueidentifier - </remarks>
		private System.Nullable<System.Guid> _ID_SysBrand;
		
		[DisplayName("ID_Sys Brand")]
		[Category("Foreign Key")]
		public System.Nullable<System.Guid> ID_SysBrand
		{
			get
			{
				try
				{
					return _ID_SysBrand;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting ID_SysBrand", err);
				}
			}
			set
			{
				try
				{
					_ID_SysBrand = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting ID_SysBrand", err);
				}
			}
		}
		
		/// <remarks>SQL Type:uniqueidentifier - </remarks>
		private System.Nullable<System.Guid> _ID_SysType;
		
		[DisplayName("ID_Sys Type")]
		[Category("Foreign Key")]
		public System.Nullable<System.Guid> ID_SysType
		{
			get
			{
				try
				{
					return _ID_SysType;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting ID_SysType", err);
				}
			}
			set
			{
				try
				{
					_ID_SysType = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting ID_SysType", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _InventoryBy;
		
		[DisplayName("Inventory By")]
		[Category("Column")]
		public string InventoryBy
		{
			get
			{
				try
				{
					return _InventoryBy;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting InventoryBy", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 200))
					{
						_InventoryBy = value;
					}
					else
					{
						throw new OverflowException("Error setting InventoryBy, Length of value is to long. Maximum Length: 200");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting InventoryBy", err);
				}
			}
		}
		
		/// <remarks>SQL Type:datetime - </remarks>
		private System.Nullable<System.DateTime> _InventoryDate;
		
		[DisplayName("Inventory Date")]
		[Category("Column")]
		public System.Nullable<System.DateTime> InventoryDate
		{
			get
			{
				try
				{
					return _InventoryDate;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting InventoryDate", err);
				}
			}
			set
			{
				try
				{
					_InventoryDate = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting InventoryDate", err);
				}
			}
		}
		
		/// <remarks>SQL Type:uniqueidentifier - </remarks>
		private System.Nullable<System.Guid> _ID_RackNumber;
		
		[DisplayName("ID_Rack Number")]
		[Category("Column")]
		public System.Nullable<System.Guid> ID_RackNumber
		{
			get
			{
				try
				{
					return _ID_RackNumber;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting ID_RackNumber", err);
				}
			}
			set
			{
				try
				{
					_ID_RackNumber = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting ID_RackNumber", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _LabelName;
		
		[DisplayName("Label Name")]
		[Category("Column")]
		public string LabelName
		{
			get
			{
				try
				{
					return _LabelName;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting LabelName", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 200))
					{
						_LabelName = value;
					}
					else
					{
						throw new OverflowException("Error setting LabelName, Length of value is to long. Maximum Length: 200");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting LabelName", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _SystemClass;
		
		[DisplayName("System Class")]
		[Category("Column")]
		public string SystemClass
		{
			get
			{
				try
				{
					return _SystemClass;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting SystemClass", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 200))
					{
						_SystemClass = value;
					}
					else
					{
						throw new OverflowException("Error setting SystemClass, Length of value is to long. Maximum Length: 200");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting SystemClass", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _StartFrom;
		
		[DisplayName("Start From")]
		[Category("Column")]
		public string StartFrom
		{
			get
			{
				try
				{
					return _StartFrom;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting StartFrom", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 200))
					{
						_StartFrom = value;
					}
					else
					{
						throw new OverflowException("Error setting StartFrom, Length of value is to long. Maximum Length: 200");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting StartFrom", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _SystemDetail;
		
		[DisplayName("System Detail")]
		[Category("Column")]
		public string SystemDetail
		{
			get
			{
				try
				{
					return _SystemDetail;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting SystemDetail", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 200))
					{
						_SystemDetail = value;
					}
					else
					{
						throw new OverflowException("Error setting SystemDetail, Length of value is to long. Maximum Length: 200");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting SystemDetail", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _IPManagement;
		
		[DisplayName("IPManagement")]
		[Category("Column")]
		public string IPManagement
		{
			get
			{
				try
				{
					return _IPManagement;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting IPManagement", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 200))
					{
						_IPManagement = value;
					}
					else
					{
						throw new OverflowException("Error setting IPManagement, Length of value is to long. Maximum Length: 200");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting IPManagement", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _IPHost;
		
		[DisplayName("IPHost")]
		[Category("Column")]
		public string IPHost
		{
			get
			{
				try
				{
					return _IPHost;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting IPHost", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 200))
					{
						_IPHost = value;
					}
					else
					{
						throw new OverflowException("Error setting IPHost, Length of value is to long. Maximum Length: 200");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting IPHost", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _HostName;
		
		[DisplayName("Host Name")]
		[Category("Column")]
		public string HostName
		{
			get
			{
				try
				{
					return _HostName;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting HostName", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 200))
					{
						_HostName = value;
					}
					else
					{
						throw new OverflowException("Error setting HostName, Length of value is to long. Maximum Length: 200");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting HostName", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _PathNumber;
		
		[DisplayName("Path Number")]
		[Category("Column")]
		public string PathNumber
		{
			get
			{
				try
				{
					return _PathNumber;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting PathNumber", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 200))
					{
						_PathNumber = value;
					}
					else
					{
						throw new OverflowException("Error setting PathNumber, Length of value is to long. Maximum Length: 200");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting PathNumber", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _SerialNumber;
		
		[DisplayName("Serial Number")]
		[Category("Column")]
		public string SerialNumber
		{
			get
			{
				try
				{
					return _SerialNumber;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting SerialNumber", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 200))
					{
						_SerialNumber = value;
					}
					else
					{
						throw new OverflowException("Error setting SerialNumber, Length of value is to long. Maximum Length: 200");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting SerialNumber", err);
				}
			}
		}
		
		/// <remarks>SQL Type:int - </remarks>
		private System.Nullable<int> _Processor;
		
		[DisplayName("Processor")]
		[Category("Column")]
		public System.Nullable<int> Processor
		{
			get
			{
				try
				{
					return _Processor;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting Processor", err);
				}
			}
			set
			{
				try
				{
					_Processor = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting Processor", err);
				}
			}
		}
		
		/// <remarks>SQL Type:int - </remarks>
		private System.Nullable<int> _Core;
		
		[DisplayName("Core")]
		[Category("Column")]
		public System.Nullable<int> Core
		{
			get
			{
				try
				{
					return _Core;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting Core", err);
				}
			}
			set
			{
				try
				{
					_Core = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting Core", err);
				}
			}
		}
		
		/// <remarks>SQL Type:int - </remarks>
		private System.Nullable<int> _RAM;
		
		[DisplayName("RAM")]
		[Category("Column")]
		public System.Nullable<int> RAM
		{
			get
			{
				try
				{
					return _RAM;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting RAM", err);
				}
			}
			set
			{
				try
				{
					_RAM = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting RAM", err);
				}
			}
		}
		
		/// <remarks>SQL Type:int - </remarks>
		private System.Nullable<int> _JumlahRAM;
		
		[DisplayName("Jumlah RAM")]
		[Category("Column")]
		public System.Nullable<int> JumlahRAM
		{
			get
			{
				try
				{
					return _JumlahRAM;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting JumlahRAM", err);
				}
			}
			set
			{
				try
				{
					_JumlahRAM = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting JumlahRAM", err);
				}
			}
		}
		
		/// <remarks>SQL Type:int - </remarks>
		private System.Nullable<int> _HDD;
		
		[DisplayName("HDD")]
		[Category("Column")]
		public System.Nullable<int> HDD
		{
			get
			{
				try
				{
					return _HDD;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting HDD", err);
				}
			}
			set
			{
				try
				{
					_HDD = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting HDD", err);
				}
			}
		}
		
		/// <remarks>SQL Type:int - </remarks>
		private System.Nullable<int> _KapasitasHDD;
		
		[DisplayName("Kapasitas HDD")]
		[Category("Column")]
		public System.Nullable<int> KapasitasHDD
		{
			get
			{
				try
				{
					return _KapasitasHDD;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting KapasitasHDD", err);
				}
			}
			set
			{
				try
				{
					_KapasitasHDD = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting KapasitasHDD", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _RaidDetail;
		
		[DisplayName("Raid Detail")]
		[Category("Column")]
		public string RaidDetail
		{
			get
			{
				try
				{
					return _RaidDetail;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting RaidDetail", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 200))
					{
						_RaidDetail = value;
					}
					else
					{
						throw new OverflowException("Error setting RaidDetail, Length of value is to long. Maximum Length: 200");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting RaidDetail", err);
				}
			}
		}
		
		/// <remarks>SQL Type:uniqueidentifier - </remarks>
		private System.Nullable<System.Guid> _ID_DataCabang;
		
		[DisplayName("ID_Data Cabang")]
		[Category("Foreign Key")]
		public System.Nullable<System.Guid> ID_DataCabang
		{
			get
			{
				try
				{
					return _ID_DataCabang;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting ID_DataCabang", err);
				}
			}
			set
			{
				try
				{
					_ID_DataCabang = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting ID_DataCabang", err);
				}
			}
		}
		
		/// <remarks>SQL Type:uniqueidentifier - </remarks>
		private System.Nullable<System.Guid> _ID_OperatingSystem;
		
		[DisplayName("ID_Operating System")]
		[Category("Foreign Key")]
		public System.Nullable<System.Guid> ID_OperatingSystem
		{
			get
			{
				try
				{
					return _ID_OperatingSystem;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting ID_OperatingSystem", err);
				}
			}
			set
			{
				try
				{
					_ID_OperatingSystem = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting ID_OperatingSystem", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _Application;
		
		[DisplayName("Application")]
		[Category("Column")]
		public string Application
		{
			get
			{
				try
				{
					return _Application;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting Application", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 200))
					{
						_Application = value;
					}
					else
					{
						throw new OverflowException("Error setting Application, Length of value is to long. Maximum Length: 200");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting Application", err);
				}
			}
		}
		
		/// <remarks>SQL Type:bit - </remarks>
		private System.Nullable<bool> _HW_Physical;
		
		[DisplayName("HW_Physical")]
		[Category("Column")]
		public System.Nullable<bool> HW_Physical
		{
			get
			{
				try
				{
					return _HW_Physical;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting HW_Physical", err);
				}
			}
			set
			{
				try
				{
					_HW_Physical = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting HW_Physical", err);
				}
			}
		}
		
		/// <remarks>SQL Type:bit - </remarks>
		private System.Nullable<bool> _HW_PowerSupply;
		
		[DisplayName("HW_Power Supply")]
		[Category("Column")]
		public System.Nullable<bool> HW_PowerSupply
		{
			get
			{
				try
				{
					return _HW_PowerSupply;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting HW_PowerSupply", err);
				}
			}
			set
			{
				try
				{
					_HW_PowerSupply = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting HW_PowerSupply", err);
				}
			}
		}
		
		/// <remarks>SQL Type:bit - </remarks>
		private System.Nullable<bool> _HW_HDD;
		
		[DisplayName("HW_HDD")]
		[Category("Column")]
		public System.Nullable<bool> HW_HDD
		{
			get
			{
				try
				{
					return _HW_HDD;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting HW_HDD", err);
				}
			}
			set
			{
				try
				{
					_HW_HDD = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting HW_HDD", err);
				}
			}
		}
		
		/// <remarks>SQL Type:bit - </remarks>
		private System.Nullable<bool> _HW_Memory;
		
		[DisplayName("HW_Memory")]
		[Category("Column")]
		public System.Nullable<bool> HW_Memory
		{
			get
			{
				try
				{
					return _HW_Memory;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting HW_Memory", err);
				}
			}
			set
			{
				try
				{
					_HW_Memory = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting HW_Memory", err);
				}
			}
		}
		
		/// <remarks>SQL Type:bit - </remarks>
		private System.Nullable<bool> _HW_FAN;
		
		[DisplayName("HW_FAN")]
		[Category("Column")]
		public System.Nullable<bool> HW_FAN
		{
			get
			{
				try
				{
					return _HW_FAN;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting HW_FAN", err);
				}
			}
			set
			{
				try
				{
					_HW_FAN = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting HW_FAN", err);
				}
			}
		}
		
		/// <remarks>SQL Type:bit - </remarks>
		private System.Nullable<bool> _HW_Ethernet;
		
		[DisplayName("HW_Ethernet")]
		[Category("Column")]
		public System.Nullable<bool> HW_Ethernet
		{
			get
			{
				try
				{
					return _HW_Ethernet;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting HW_Ethernet", err);
				}
			}
			set
			{
				try
				{
					_HW_Ethernet = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting HW_Ethernet", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _HW_Notes;
		
		[DisplayName("HW_Notes")]
		[Category("Column")]
		public string HW_Notes
		{
			get
			{
				try
				{
					return _HW_Notes;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting HW_Notes", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 1000))
					{
						_HW_Notes = value;
					}
					else
					{
						throw new OverflowException("Error setting HW_Notes, Length of value is to long. Maximum Length: 1000");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting HW_Notes", err);
				}
			}
		}
		
		/// <remarks>SQL Type:varchar - </remarks>
		private string _URLAttachment;
		
		[DisplayName("URLAttachment")]
		[Category("Column")]
		public string URLAttachment
		{
			get
			{
				try
				{
					return _URLAttachment;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting URLAttachment", err);
				}
			}
			set
			{
				try
				{
					if ((value.Length <= 400))
					{
						_URLAttachment = value;
					}
					else
					{
						throw new OverflowException("Error setting URLAttachment, Length of value is to long. Maximum Length: 400");
					}
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting URLAttachment", err);
				}
			}
		}
		
		/// <remarks>SQL Type:bit - </remarks>
		private System.Nullable<bool> _IsDeleted;
		
		[DisplayName("Is Deleted")]
		[Category("Column")]
		public System.Nullable<bool> IsDeleted
		{
			get
			{
				try
				{
					return _IsDeleted;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting IsDeleted", err);
				}
			}
			set
			{
				try
				{
					_IsDeleted = value;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting IsDeleted", err);
				}
			}
		}
		#endregion
		
		#region Related Objects
		/// <remarks>Represents the foreign key object</remarks>
		private Location _ID_DataCabang_Location;
		
		[Description("Represents the foreign key object of the type Location")]
		public Location ID_DataCabang_Location
		{
			get
			{
				try
				{
					return _ID_DataCabang_Location;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting ID_DataCabang_Location", err);
				}
			}
			set
			{
				try
				{
					_ID_DataCabang_Location = value;
					_ID_DataCabang = _ID_DataCabang_Location.ID;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting ID_DataCabang_Location", err);
				}
			}
		}
		
		/// <remarks>Represents the foreign key object</remarks>
		private Operating_System _ID_OperatingSystem_Operating_System;
		
		[Description("Represents the foreign key object of the type Operating_System")]
		public Operating_System ID_OperatingSystem_Operating_System
		{
			get
			{
				try
				{
					return _ID_OperatingSystem_Operating_System;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting ID_OperatingSystem_Operating_System", err);
				}
			}
			set
			{
				try
				{
					_ID_OperatingSystem_Operating_System = value;
					_ID_OperatingSystem = _ID_OperatingSystem_Operating_System.ID;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting ID_OperatingSystem_Operating_System", err);
				}
			}
		}
		
		/// <remarks>Represents the foreign key object</remarks>
		private System_Brand _ID_SysBrand_System_Brand;
		
		[Description("Represents the foreign key object of the type System_Brand")]
		public System_Brand ID_SysBrand_System_Brand
		{
			get
			{
				try
				{
					return _ID_SysBrand_System_Brand;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting ID_SysBrand_System_Brand", err);
				}
			}
			set
			{
				try
				{
					_ID_SysBrand_System_Brand = value;
					_ID_SysBrand = _ID_SysBrand_System_Brand.ID;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting ID_SysBrand_System_Brand", err);
				}
			}
		}
		
		/// <remarks>Represents the foreign key object</remarks>
		private System_Type _ID_SysType_System_Type;
		
		[Description("Represents the foreign key object of the type System_Type")]
		public System_Type ID_SysType_System_Type
		{
			get
			{
				try
				{
					return _ID_SysType_System_Type;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error getting ID_SysType_System_Type", err);
				}
			}
			set
			{
				try
				{
					_ID_SysType_System_Type = value;
					_ID_SysType = _ID_SysType_System_Type.ID;
				}
				catch (System.Exception err)
				{
					throw new Exception("Error setting ID_SysType_System_Type", err);
				}
			}
		}
		#endregion
		
		#region Public Methods
		public void Select()
		{
			try
			{
				SqlConnection Conn = new SqlConnection(_connString);
				SqlCommand Com = Conn.CreateCommand();
				Com.CommandText = Inventory_Physical._SQL_Select;
				Com.Parameters.AddRange(GetSqlParameters());
				Conn.Open();
				SqlDataReader rs = Com.ExecuteReader();
				while(rs.Read())
				{
					AddFromRecordSet(rs);
				}
				rs.Close();
				Conn.Close();
				rs.Dispose();
				Com.Dispose();
				Conn.Dispose();
			}
			catch (System.Exception )
			{
				throw;
			}
		}
		
		public System.Data.DataTable SelectByParam()
		{
			try
			{
				SqlConnection Conn = new SqlConnection(_connString);
				SqlCommand Com = Conn.CreateCommand();
				Com.CommandText = Inventory_Physical._SQL_SelectByParam;
				Com.Parameters.AddRange(GetSqlParameters());
				Conn.Open();
				SqlDataAdapter objDataAdapter = new SqlDataAdapter(Com);
				DataTable objDataTable = new DataTable();
				objDataAdapter.Fill(objDataTable);
				Conn.Close();
				Com.Dispose();
				Conn.Dispose();
				return objDataTable;
			}
			catch (System.Exception )
			{
				throw;
			}
		}
		
		public int Insert()
		{
			try
			{
				SqlConnection Conn = new SqlConnection(_connString);
				SqlCommand Com = Conn.CreateCommand();
				Com.CommandText = Inventory_Physical._SQL_Insert;
				Com.Parameters.AddRange(GetSqlParameters());
				Conn.Open();
				int rowseffected = Com.ExecuteNonQuery();
				Conn.Close();
				Com.Dispose();
				Conn.Dispose();
				return rowseffected;
			}
			catch (System.Exception )
			{
				throw;
			}
		}
		
		public int Update()
		{
			try
			{
				SqlConnection Conn = new SqlConnection(_connString);
				SqlCommand Com = Conn.CreateCommand();
				Com.CommandText = Inventory_Physical._SQL_Update;
				Com.Parameters.AddRange(GetSqlParameters());
				Conn.Open();
				int rowseffected = Com.ExecuteNonQuery();
				Conn.Close();
				Com.Dispose();
				Conn.Dispose();
				return rowseffected;
			}
			catch (System.Exception )
			{
				throw;
			}
		}
		
		public int Delete()
		{
			try
			{
				SqlConnection Conn = new SqlConnection(_connString);
				SqlCommand Com = Conn.CreateCommand();
				Com.CommandText = Inventory_Physical._SQL_Delete;
				Com.Parameters.AddRange(GetSqlParameters());
				Conn.Open();
				int rowseffected = Com.ExecuteNonQuery();
				Conn.Close();
				Com.Dispose();
				Conn.Dispose();
				return rowseffected;
			}
			catch (System.Exception )
			{
				throw;
			}
		}
		
		public string[] GetSqlCommandStrings()
		{
			try
			{
				string[] CommStr = new string[4];
				CommStr[0] = "SELECT [ID], [ID_SysBrand], [ID_SysType], [InventoryBy], [InventoryDate], [ID_RackNumber], [LabelName], [SystemClass], [StartFrom], [SystemDetail], [IPManagement], [IPHost], [HostName], [PathNumber], [SerialNumber], [Processor], [Core], [RAM], [JumlahRAM], [HDD], [KapasitasHDD], [RaidDetail], [ID_DataCabang], [ID_OperatingSystem], [Application], [HW_Physical], [HW_PowerSupply], [HW_HDD], [HW_Memory], [HW_FAN], [HW_Ethernet], [HW_Notes], [URLAttachment], [IsDeleted] FROM [dbo].[Inventory Physical] WHERE [ID] = " + _ID + "";
				CommStr[1] = "INSERT INTO [dbo].[Inventory Physical] ([ID], [ID_SysBrand], [ID_SysType], [InventoryBy], [InventoryDate], [ID_RackNumber], [LabelName], [SystemClass], [StartFrom], [SystemDetail], [IPManagement], [IPHost], [HostName], [PathNumber], [SerialNumber], [Processor], [Core], [RAM], [JumlahRAM], [HDD], [KapasitasHDD], [RaidDetail], [ID_DataCabang], [ID_OperatingSystem], [Application], [HW_Physical], [HW_PowerSupply], [HW_HDD], [HW_Memory], [HW_FAN], [HW_Ethernet], [HW_Notes], [URLAttachment], [IsDeleted]) VALUES(" + _ID + ", " + _ID_SysBrand + ", " + _ID_SysType + ", '" + _InventoryBy.Replace("'","''") + "', '" + _InventoryDate + "', " + _ID_RackNumber + ", '" + _LabelName.Replace("'","''") + "', '" + _SystemClass.Replace("'","''") + "', '" + _StartFrom.Replace("'","''") + "', '" + _SystemDetail.Replace("'","''") + "', '" + _IPManagement.Replace("'","''") + "', '" + _IPHost.Replace("'","''") + "', '" + _HostName.Replace("'","''") + "', '" + _PathNumber.Replace("'","''") + "', '" + _SerialNumber.Replace("'","''") + "', " + _Processor + ", " + _Core + ", " + _RAM + ", " + _JumlahRAM + ", " + _HDD + ", " + _KapasitasHDD + ", '" + _RaidDetail.Replace("'","''") + "', " + _ID_DataCabang + ", " + _ID_OperatingSystem + ", '" + _Application.Replace("'","''") + "', " + _HW_Physical + ", " + _HW_PowerSupply + ", " + _HW_HDD + ", " + _HW_Memory + ", " + _HW_FAN + ", " + _HW_Ethernet + ", '" + _HW_Notes.Replace("'","''") + "', '" + _URLAttachment.Replace("'","''") + "', " + _IsDeleted + ")";
				CommStr[2] = "UPDATE [dbo].[Inventory Physical] SET [ID_SysBrand] = " + _ID_SysBrand + " ,[ID_SysType] = " + _ID_SysType + " ,[InventoryBy] = '" + _InventoryBy.Replace("'","''") + "' ,[InventoryDate] = '" + _InventoryDate + "' ,[ID_RackNumber] = " + _ID_RackNumber + " ,[LabelName] = '" + _LabelName.Replace("'","''") + "' ,[SystemClass] = '" + _SystemClass.Replace("'","''") + "' ,[StartFrom] = '" + _StartFrom.Replace("'","''") + "' ,[SystemDetail] = '" + _SystemDetail.Replace("'","''") + "' ,[IPManagement] = '" + _IPManagement.Replace("'","''") + "' ,[IPHost] = '" + _IPHost.Replace("'","''") + "' ,[HostName] = '" + _HostName.Replace("'","''") + "' ,[PathNumber] = '" + _PathNumber.Replace("'","''") + "' ,[SerialNumber] = '" + _SerialNumber.Replace("'","''") + "' ,[Processor] = " + _Processor + " ,[Core] = " + _Core + " ,[RAM] = " + _RAM + " ,[JumlahRAM] = " + _JumlahRAM + " ,[HDD] = " + _HDD + " ,[KapasitasHDD] = " + _KapasitasHDD + " ,[RaidDetail] = '" + _RaidDetail.Replace("'","''") + "' ,[ID_DataCabang] = " + _ID_DataCabang + " ,[ID_OperatingSystem] = " + _ID_OperatingSystem + " ,[Application] = '" + _Application.Replace("'","''") + "' ,[HW_Physical] = " + _HW_Physical + " ,[HW_PowerSupply] = " + _HW_PowerSupply + " ,[HW_HDD] = " + _HW_HDD + " ,[HW_Memory] = " + _HW_Memory + " ,[HW_FAN] = " + _HW_FAN + " ,[HW_Ethernet] = " + _HW_Ethernet + " ,[HW_Notes] = '" + _HW_Notes.Replace("'","''") + "' ,[URLAttachment] = '" + _URLAttachment.Replace("'","''") + "' ,[IsDeleted] = " + _IsDeleted + " WHERE [ID] = " + _ID + "";
				CommStr[3] = "DELETE FROM [dbo].[Inventory Physical] WHERE [ID] = " + _ID + "";
				return CommStr;
			}
			catch (System.Exception )
			{
				throw;
			}
		}
		
		public static string CheckRackFilled(int StartFrom, string ID_RackNumber)
        {
            string ret = string.Empty;
            using (SqlConnection con = new SqlConnection(_connString))
            {
                con.Open();
                string sql = @"SELECT TOP 1 LabelName
                              FROM [InventoryManagement].[dbo].[Inventory Physical] JOIN [InventoryManagement].[dbo].[System Type] ON ID_SysType = [System Type].ID 
                              WHERE (@START >= StartFrom AND @START <= StartFrom+Size) AND [ID_RackNumber] = @ID_RACKNUMBER AND [InventoryManagement].[dbo].[Inventory Physical].[IsDeleted] = @ISDELETED
                              AND [InventoryManagement].[dbo].[System Type].[IsDeleted] = @ISDELETED";
                using (SqlCommand cmd = new SqlCommand(sql, con))
                {
                    cmd.Parameters.AddWithValue("@START", StartFrom);
                    cmd.Parameters.AddWithValue("@ID_RACKNUMBER", MII_FIF.Common.StringUtil.ToGuid(ID_RackNumber));
                    cmd.Parameters.AddWithValue("@ISDELETED", false);
                    using (SqlDataReader rs = cmd.ExecuteReader())
                    {
                        while (rs.Read())
                        {
                            ret = rs[0].ToString();
                        }
                    }
                }
            }
            return ret;
        }
		#endregion
		
		#region Private Methods
		private void AddFromRecordSet(SqlDataReader rs)
		{
			try
			{
				// if value from the recordset, to the ID field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("ID")) == false))
				{
					ID = rs.GetGuid(rs.GetOrdinal("ID"));
				}
				// if value from the recordset, to the ID_SysBrand field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("ID_SysBrand")) == false))
				{
					ID_SysBrand = rs.GetGuid(rs.GetOrdinal("ID_SysBrand"));
				}
				// if value from the recordset, to the ID_SysType field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("ID_SysType")) == false))
				{
					ID_SysType = rs.GetGuid(rs.GetOrdinal("ID_SysType"));
				}
				// if value from the recordset, to the InventoryBy field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("InventoryBy")) == false))
				{
					InventoryBy = rs.GetString(rs.GetOrdinal("InventoryBy"));
				}
				// if value from the recordset, to the InventoryDate field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("InventoryDate")) == false))
				{
					InventoryDate = rs.GetDateTime(rs.GetOrdinal("InventoryDate"));
				}
				// if value from the recordset, to the ID_RackNumber field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("ID_RackNumber")) == false))
				{
					ID_RackNumber = rs.GetGuid(rs.GetOrdinal("ID_RackNumber"));
				}
				// if value from the recordset, to the LabelName field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("LabelName")) == false))
				{
					LabelName = rs.GetString(rs.GetOrdinal("LabelName"));
				}
				// if value from the recordset, to the SystemClass field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("SystemClass")) == false))
				{
					SystemClass = rs.GetString(rs.GetOrdinal("SystemClass"));
				}
				// if value from the recordset, to the StartFrom field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("StartFrom")) == false))
				{
					StartFrom = rs.GetString(rs.GetOrdinal("StartFrom"));
				}
				// if value from the recordset, to the SystemDetail field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("SystemDetail")) == false))
				{
					SystemDetail = rs.GetString(rs.GetOrdinal("SystemDetail"));
				}
				// if value from the recordset, to the IPManagement field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("IPManagement")) == false))
				{
					IPManagement = rs.GetString(rs.GetOrdinal("IPManagement"));
				}
				// if value from the recordset, to the IPHost field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("IPHost")) == false))
				{
					IPHost = rs.GetString(rs.GetOrdinal("IPHost"));
				}
				// if value from the recordset, to the HostName field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("HostName")) == false))
				{
					HostName = rs.GetString(rs.GetOrdinal("HostName"));
				}
				// if value from the recordset, to the PathNumber field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("PathNumber")) == false))
				{
					PathNumber = rs.GetString(rs.GetOrdinal("PathNumber"));
				}
				// if value from the recordset, to the SerialNumber field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("SerialNumber")) == false))
				{
					SerialNumber = rs.GetString(rs.GetOrdinal("SerialNumber"));
				}
				// if value from the recordset, to the Processor field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("Processor")) == false))
				{
					Processor = rs.GetInt32(rs.GetOrdinal("Processor"));
				}
				// if value from the recordset, to the Core field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("Core")) == false))
				{
					Core = rs.GetInt32(rs.GetOrdinal("Core"));
				}
				// if value from the recordset, to the RAM field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("RAM")) == false))
				{
					RAM = rs.GetInt32(rs.GetOrdinal("RAM"));
				}
				// if value from the recordset, to the JumlahRAM field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("JumlahRAM")) == false))
				{
					JumlahRAM = rs.GetInt32(rs.GetOrdinal("JumlahRAM"));
				}
				// if value from the recordset, to the HDD field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("HDD")) == false))
				{
					HDD = rs.GetInt32(rs.GetOrdinal("HDD"));
				}
				// if value from the recordset, to the KapasitasHDD field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("KapasitasHDD")) == false))
				{
					KapasitasHDD = rs.GetInt32(rs.GetOrdinal("KapasitasHDD"));
				}
				// if value from the recordset, to the RaidDetail field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("RaidDetail")) == false))
				{
					RaidDetail = rs.GetString(rs.GetOrdinal("RaidDetail"));
				}
				// if value from the recordset, to the ID_DataCabang field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("ID_DataCabang")) == false))
				{
					ID_DataCabang = rs.GetGuid(rs.GetOrdinal("ID_DataCabang"));
				}
				// if value from the recordset, to the ID_OperatingSystem field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("ID_OperatingSystem")) == false))
				{
					ID_OperatingSystem = rs.GetGuid(rs.GetOrdinal("ID_OperatingSystem"));
				}
				// if value from the recordset, to the Application field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("Application")) == false))
				{
					Application = rs.GetString(rs.GetOrdinal("Application"));
				}
				// if value from the recordset, to the HW_Physical field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("HW_Physical")) == false))
				{
					HW_Physical = rs.GetBoolean(rs.GetOrdinal("HW_Physical"));
				}
				// if value from the recordset, to the HW_PowerSupply field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("HW_PowerSupply")) == false))
				{
					HW_PowerSupply = rs.GetBoolean(rs.GetOrdinal("HW_PowerSupply"));
				}
				// if value from the recordset, to the HW_HDD field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("HW_HDD")) == false))
				{
					HW_HDD = rs.GetBoolean(rs.GetOrdinal("HW_HDD"));
				}
				// if value from the recordset, to the HW_Memory field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("HW_Memory")) == false))
				{
					HW_Memory = rs.GetBoolean(rs.GetOrdinal("HW_Memory"));
				}
				// if value from the recordset, to the HW_FAN field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("HW_FAN")) == false))
				{
					HW_FAN = rs.GetBoolean(rs.GetOrdinal("HW_FAN"));
				}
				// if value from the recordset, to the HW_Ethernet field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("HW_Ethernet")) == false))
				{
					HW_Ethernet = rs.GetBoolean(rs.GetOrdinal("HW_Ethernet"));
				}
				// if value from the recordset, to the HW_Notes field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("HW_Notes")) == false))
				{
					HW_Notes = rs.GetString(rs.GetOrdinal("HW_Notes"));
				}
				// if value from the recordset, to the URLAttachment field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("URLAttachment")) == false))
				{
					URLAttachment = rs.GetString(rs.GetOrdinal("URLAttachment"));
				}
				// if value from the recordset, to the IsDeleted field is NOT null then set the value.
				if ((rs.IsDBNull(rs.GetOrdinal("IsDeleted")) == false))
				{
					IsDeleted = rs.GetBoolean(rs.GetOrdinal("IsDeleted"));
				}
			}
			catch (SqlException sqlExc)
			{
				throw sqlExc;
			}
			catch (Exception Exc)
			{
				throw Exc;
			}
		}
		
		private SqlParameter[] GetSqlParameters()
		{
			List<SqlParameter> SqlParmColl = new List<SqlParameter>();
			try
			{
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@ID", ID, SqlDbType.UniqueIdentifier));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@ID_SysBrand", ID_SysBrand, SqlDbType.UniqueIdentifier));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@ID_SysType", ID_SysType, SqlDbType.UniqueIdentifier));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@InventoryBy", InventoryBy, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@InventoryDate", InventoryDate, SqlDbType.DateTime));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@ID_RackNumber", ID_RackNumber, SqlDbType.UniqueIdentifier));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@LabelName", LabelName, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@SystemClass", SystemClass, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@StartFrom", StartFrom, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@SystemDetail", SystemDetail, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@IPManagement", IPManagement, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@IPHost", IPHost, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@HostName", HostName, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@PathNumber", PathNumber, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@SerialNumber", SerialNumber, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@Processor", Processor, SqlDbType.Int));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@Core", Core, SqlDbType.Int));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@RAM", RAM, SqlDbType.Int));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@JumlahRAM", JumlahRAM, SqlDbType.Int));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@HDD", HDD, SqlDbType.Int));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@KapasitasHDD", KapasitasHDD, SqlDbType.Int));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@RaidDetail", RaidDetail, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@ID_DataCabang", ID_DataCabang, SqlDbType.UniqueIdentifier));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@ID_OperatingSystem", ID_OperatingSystem, SqlDbType.UniqueIdentifier));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@Application", Application, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@HW_Physical", HW_Physical, SqlDbType.Bit));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@HW_PowerSupply", HW_PowerSupply, SqlDbType.Bit));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@HW_HDD", HW_HDD, SqlDbType.Bit));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@HW_Memory", HW_Memory, SqlDbType.Bit));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@HW_FAN", HW_FAN, SqlDbType.Bit));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@HW_Ethernet", HW_Ethernet, SqlDbType.Bit));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@HW_Notes", HW_Notes, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@URLAttachment", URLAttachment, SqlDbType.VarChar));
				SqlParmColl.Add(InventoryManagement.AddSqlParm("@IsDeleted", IsDeleted, SqlDbType.Bit));
				return SqlParmColl.ToArray();
			}
			catch (Exception Exc)
			{
				throw Exc;
			}
		}
		#endregion
	}
	
	public class Inventory_PhysicalCollection : System.Collections.CollectionBase
	{
		
		[Description("Adds a new Inventory_Physical to the collection.")]
		public int Add(Inventory_Physical item)
		{
			int newindex = List.Add(item);
			return newindex;
		}
		
		[Description("Removes a Inventory_Physical from the collection.")]
		public void Remove(Inventory_Physical item)
		{
			List.Remove(item);
		}
		
		[Description("Inserts an Inventory_Physical into the collection at the specified index.")]
		public void Insert(int index, Inventory_Physical item)
		{
			List.Insert(index, item);
		}
		
		[Description("Returns the index value of the Inventory_Physical class in the collection.")]
		public int IndexOf(Inventory_Physical item)
		{
			return List.IndexOf(item);
		}
		
		[Description("Returns true if the Inventory_Physical class is present in the collection.")]
		public bool Contains(Inventory_Physical item)
		{
			return List.Contains(item);
		}
	}
	
	public enum Inventory_Physical_Fields
	{
		
		ID,
		
		ID_SysBrand,
		
		ID_SysType,
		
		InventoryBy,
		
		InventoryDate,
		
		ID_RackNumber,
		
		LabelName,
		
		SystemClass,
		
		StartFrom,
		
		SystemDetail,
		
		IPManagement,
		
		IPHost,
		
		HostName,
		
		PathNumber,
		
		SerialNumber,
		
		Processor,
		
		Core,
		
		RAM,
		
		JumlahRAM,
		
		HDD,
		
		KapasitasHDD,
		
		RaidDetail,
		
		ID_DataCabang,
		
		ID_OperatingSystem,
		
		Application,
		
		HW_Physical,
		
		HW_PowerSupply,
		
		HW_HDD,
		
		HW_Memory,
		
		HW_FAN,
		
		HW_Ethernet,
		
		HW_Notes,
		
		URLAttachment,
		
		IsDeleted,
	}
}
